<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>推荐位列表</title>
    <Pintuer />
</head>
<body>
    <div class="container-layout">
        <div class="bg border margin-little-bottom padding-left padding-top padding-bottom">
            <button type="button" onClick="location.href='{|U:'index',array('mid'=> $_REQUEST['mid'])}'" class="button bg">
                <i class="icon-th-list"></i>
                属性列表
            </button>
            <button type="button" onClick="location.href='{|U:'add',array('mid'=>$_REQUEST['mid'])}'" class="button">
                <i class="icon-edit"></i>
                添加属性
            </button>
            <button type="button" onClick="location.href='{|U:'updateCache',array('mid'=> $hd['request']['mid'])}'" class="button">
                <i class="icon-eraser"></i>
                更新缓存
            </button>
        </div>
    </div>

<div class="container-layout">
    <div class="bg border border padding margin-top">
        当前模型
        <select name="mid">
            <list from='$model' name="$m">
            <option value="{$m.mid}" <if value="$hd.request.mid eq $m.mid">selected=''</if>>{$m.model_name}</option>
            </list>
        </select>
    </div>
    <script>
        $("[name='mid']").change(function()
        {
            var mid = $(this).val();
           location.href="{|U:'index'}&mid="+mid;
        })
    </script>
    <form method="POST" action="{|U:'edit'}">
        <table class="table table-bordered table-hover table-condensed margin-top">
            <tr class="bg">
                <td class="hd-w100">fid</td>
                <td>属性名称</td>
                <td class="hd-w50">操作</td>
            </tr>
            <list from="$flag" name="$name">
                <tr>
                    <td>
                        {$name}
                    </td>
                    <td>
                        <input type="text" name="flag[]" value="{$name}"/>
                    </td>
                    <td>
                       <a href="javascript:;" onclick="del({$hd.get.mid},<?php echo $hd['list']['name']['index'] - 1; ?>);">删除
                               </a>
                    </td>
                </tr>
            </list>
            <tr>
                <td colspan="3">
                    <input type="hidden" name="mid" value="{$hd.request.mid}" />
                    <button type="submit" class="button bg-sub">
                        <i class="icon-check-square-o"></i>
                        提交保存
                    </button>
                </td>
            </tr>
        </table>
</form>
</div>
</body>
</html>